package com.hmall.mapper;

import com.hmall.model.MallPushMessage;
import com.hmall.util.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 消息Mapper
 */
public interface MallPushMessageMapper extends MyMapper<MallPushMessage> {

   void  insertPushMsg(@Param("msg") MallPushMessage msg);

   void updateIsReadPushMsgById(@Param("isRead") Integer isRead, @Param("messageId") Integer messageId);

   void cancelPushMsgById(@Param("enable") Integer enable, @Param("messageId") Integer messageId);

   List<MallPushMessage> selectDirectPushMsgPage(@Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize, @Param("username") String username);

   Integer selectDirectPushMsgTotal(@Param("username") String username);

   List<MallPushMessage> selectPublicPushMsgPage(@Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);

   Integer selectPublicPushMsgTotal();

   Integer selectNoReadContByDirect(@Param("username") String username);

   Integer selectNoReadContByPublic();
}